Repository navigation
ci: install Java 8 toolchain alongside Java 21 - #2249
Closed
Vincent Biret (baywet) wants to merge 1 commit into
Closed
Vincent Biret (baywet) wants to merge 1 commit into
Vincent Biret (baywet) wants to merge 1 commit into
Conversation
Install the Java 8 compiler required by -Pjava8=true instead of relying on the hosted runner image. Keep Java 21 as the default JVM for Gradle. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: de23e4a2-18d4-4f3f-a50e-d16751ed83b7
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the CI update that adds Java 8 while keeping Java 21 as the default JVM.
No open issues 🎉
What changed in this PR
This PR updates CI to provide the Java 8 compiler required by the compatibility build while keeping Java 21 as Gradle’s default JVM.
Changes:
- Explicitly installs Temurin JDK 8 and 21 through
actions/setup-java. - Lists Java 21 last to preserve it as the default JVM.
| File | Description |
|---|---|
.github/workflows/build.yml |
Installs both JDKs for the main and Java 8 compatibility builds. |
Review effort: Balanced
|
Member
Author
|
included in #2239 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Install Temurin JDK 8 and 21 explicitly in the build workflow, keeping Java 21 as the default JVM for Gradle.
The Java 8 compatibility build requires a Java 8 compiler. The ubuntu-latest runner used by the failing job is Ubuntu 26.04, whose preinstalled JDKs do not include Java 8. Installing only Java 21 causes Gradle toolchain resolution to fail before compilation.
Failure: https://github.com/microsoft/kiota-java/actions/runs/43425097153/job/131886230916
Validation
git diff --checkpassed.